<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../lib/layui-v2.5.5/css/layui.css" media="all">
    
    <link rel="stylesheet" href="../css/public.css" media="all">
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
  <div id="test1"></div>
  <script src="../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
  <script>
  layui.use('tree', function(){
    var tree = layui.tree;
   
    //渲染
    var inst1 = tree.render({
      elem: '#test1'  //绑定元素
      ,data: [{
        title: '一级目录' //一级菜单
        ,children: [{
          title: '一级文件夹' //二级菜单
          ,children: [{
            title: '' //三级菜单
            //…… //以此类推，可无限层级
          }]
        }]
      },{
        title: '二级目录' //一级菜单
        ,children: [{
          title: '二级文件夹' //二级菜单
        }]
      }]
    });
  });
  </script>

    </div>
</div>


</body>
</html>